// （主动操作后的反馈提示）

import { ElMessage } from "element-plus";

type MessageType = "primary" | "success" | "warning" | "info" | "error";

function message(message: string, type: MessageType) {
  // console.log(type, message);
  ElMessage({
    message,
    type,
    plain: true,
  });
}

export function showSuccess(msg: string) {
  message(msg, "success");
}
export function showError(msg: string) {
  message(msg, "error");
}
export function showWarning(msg: string) {
  message(msg, "warning");
}
